1 link tagged with all of: amdahls law + io bound + profiling + c
Click any tag below to further narrow down your results
Links
Rewriting programs in C or Rust rarely makes them much faster, because most real software spends its time waiting on I/O or calling optimized libraries already. The author argues the big speedups come from redesigning what a program does, not from changing its language.
- Most CRUD apps are I/O-bound: if half a request's time goes to database queries, even infinitely fast code caps the gain at about 2x (Amdahl's law).
- Slow languages like Python already offload heavy work to C through libraries such as NumPy and cmark-gfm, so rewriting rarely helps the hot path.
- Bryan Cantrill's Rust rewrite of a C program ran 30% faster, not slower, because of a data structure choice (B-tree over binary tree) rather than the language.
- Real gains come from caching slow calls, moving work async, fixing N+1 queries, and skipping unneeded operations, none of which depend on language speed.